package foundation.filter;


import foundation.annotation.LoginUser;

import javax.annotation.Priority;
import javax.ws.rs.Priorities;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.Provider;

/**
 * @author futao
 * Created on 18-7-23-上午11:03.
 */
@Provider   //注解Jersey注解，Jersey扫描到该注解，就会创建对应的组件对象。
@LoginUser
@Priority(Priorities.USER)      //是用于表示该过滤器的执行顺序，其中参数为long类型，对于请求过滤器，该数值越小越先执行，响应过滤器则相反。
public class AnnotationFilter implements ContainerRequestFilter, ContainerResponseFilter {

    @Override
    public void filter(ContainerRequestContext containerRequestContext) {
    }

    @Override
    public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) {
    }
}
